﻿<Window x:Class="SmallTfs.ProgressDialog"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Processing..."
        Width="155"
        Height="155"
        WindowStartupLocation="CenterOwner"
        AllowsTransparency="True"
        Opacity="1"
        WindowStyle="None"
        Background="{x:Null}"
        ShowInTaskbar="False">
     <Border CornerRadius="12,12,12,12" Margin="10"
          
          Height="Auto">
        <!--<Border.Background>
         
         BorderBrush="#FF020202"
          BorderThickness="0,0,0,0"
         
            <LinearGradientBrush EndPoint="0.874,1.197"
                           StartPoint="0.126,-0.197">
                <GradientStop Color="#FF030404"
                      Offset="0" />
                <GradientStop Color="#FF000000"
                      Offset="1" />
                <GradientStop Color="#FFABB8B9"
                      Offset="0.304" />
            </LinearGradientBrush>
        </Border.Background>-->
        <Border.Effect>
            <DropShadowEffect/>
        </Border.Effect>
            <Grid>
           
            <Canvas Grid.Row="0"  HorizontalAlignment="Center" VerticalAlignment="Center">

                <Canvas.RenderTransform>
                    <TransformGroup>

                        <RotateTransform x:Name="angle" Angle="0" CenterX="0.5" CenterY="0.5"/>

                        <!-- Ideally remove the translation and scale from here
                 and let the container apply them instead -->

                        <TranslateTransform X="-0.5" Y="-0.5"/>
                        <ScaleTransform ScaleX="100" ScaleY="100"/>

                    </TransformGroup>
                </Canvas.RenderTransform>

                <Canvas.Triggers>
                    <EventTrigger RoutedEvent="Canvas.Loaded">
                        <BeginStoryboard>
                            <Storyboard x:Name="rotation">
                                <DoubleAnimation To="1" Duration="0:0:1"
                                                    Storyboard.TargetName="content"
                                                    Storyboard.TargetProperty="Opacity"/>
                                <DoubleAnimation From="0" To="359" Duration="0:0:3" RepeatBehavior="Forever"
                                                    Storyboard.TargetName="angle"
                                                    Storyboard.TargetProperty="Angle"/>
                            </Storyboard>
                        </BeginStoryboard>
                    </EventTrigger>
                </Canvas.Triggers>

                <Canvas Name="content" Opacity="0">
                    <Path Canvas.Left="0.49" Canvas.Top="-0.05" Width="0.2" Height="0.2" Stretch="Fill" Fill="Black">
                        <Path.Data>
                            <PathGeometry>
                                <PathFigure StartPoint="0,-1.1">
                                    <LineSegment Point="0.1,-1" />
                                    <LineSegment Point="0,-0.9" />
                                </PathFigure>
                            </PathGeometry>
                        </Path.Data>
                    </Path>

                </Canvas>
                <Path Width="1" Height="1" Stretch="Fill" Stroke="Black" StrokeThickness="0.1" StrokeStartLineCap="Round" Data="M1,0 A1,1,90,1,1,0,-1" Canvas.Left="0" Canvas.Top="0"></Path>
            </Canvas>
            <Label x:Name="lblDuration" Content="00:00:00" HorizontalAlignment="Center" VerticalAlignment="Center" />
        </Grid>
        
        
    </Border>
</Window>
